import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class Solution2280 {
    public int minimumLines(int[][] stockPrices) {
        if (stockPrices.length==1){
            return 0;
        }
        Arrays.sort(stockPrices, Comparator.comparingInt(a -> a[0]));
        List<int[]> list=new ArrayList<>();
        for (int i=0;i<stockPrices.length-1;i++){
            list.add(new int[]{stockPrices[i+1][1]-stockPrices[i][1],stockPrices[i+1][0]-stockPrices[i][0]});
        }
        int ans=1;
        for (int i=1;i<list.size();i++){
            if ((long)list.get(i)[0]*list.get(i-1)[1]!=(long)list.get(i)[1]*list.get(i-1)[0]){
                ans++;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2280().minimumLines(new int[][]{{1,7},{2,6},{3,5},{4,4},{5,4},{6,3},{7,2},{8,1}}));
    }
}
